﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Linq;
using System.Xml;
using System.Collections;

namespace MusicOnLine.Common
{
    public class Common
    {
        public static IEnumerable<object> GetGenre()
        {
            string path = System.Web.HttpContext.Current.Server.MapPath("/ConfigDoc/Genre.xml");
            var genreDoc = XDocument.Load(path);
            var query = (from u in genreDoc.Descendants("item")
                        select new {genre=u.Value }).ToList();
            return query;
        }
    }
}